// custom colors
$exclude-background: #fcc;
$radio-mark-background: #d6d5d5;

tg-filter {
    @include sidebar-medium-width-hidden-absolute();
    background: $grey-02;
    display: block;
    max-height: 100%;
    min-height: 100%;
    overflow-y: auto;
    padding: 1rem 0;
    z-index: 1;
    .filters-applied {
        padding: 0 1rem 1rem;
        .single-filter {
            &.exclude {
                background: $exclude-background;
                text-decoration: line-through;
            }
            &:hover {
                color: currentColor;
                cursor: default;
                transition: none;
            }
        }
    }
    .filters-advanced {
        @include font-type(light);
        @include font-size(xsmall);
        font-size: 10pt;
        font-weight: 600;
        padding: 0 1rem 1rem;

        .collapsed.exclude {
            color: $red-light;
        }

        a .icon {
            margin-left: 5px;
            vertical-align: bottom;
            width: .5rem;
        }

        .filters-advanced-form {
            padding: .75rem 0;
            text-align: center;
        }

        .custom-radio {
            display: inline;

            input[type=radio] {
                display: none;
            }
        }

        .filter-mode {
            cursor: pointer;

            &.include {
                margin-right: .75rem;
            }
            &.active .radio-mark-inner {
                opacity: 1;
            }
            &.active.include {
                color: $primary;
            }
            &.active.exclude {
                color: $red-light;
            }
        }

        .radio-mark,
        .radio-mark-inner {
            border-radius: 50%;
            display: inline-block;
        }

        .radio-mark {
            background: $radio-mark-background;
            height: 22px;
            margin-right: 3px;
            text-align: center;
            width: 22px;
        }

        .radio-mark-inner {
            height: 14px;
            margin-top: 4px;
            opacity: 0;
            width: 14px;

            &.include {
                background: $primary;
            }

            &.exclude {
                background: $red-light;
            }
        }
    }

    h1,
    form {
        padding: 0 1rem;
    }
    input {
        background: $grayer;
        color: $white;
        padding-right: 2rem;
        @include placeholder {
            color: $gray-light;
        }
    }
    .search-action {
        position: absolute;
        right: .7rem;
        top: .7rem;
    }
    &.open {
        box-shadow: 1px 1px 5px rgba($gray, .2);
    }
}

.filter-list {
    overflow-y: auto;
    padding: 1rem;
}

.filters-step-cat {
    margin-top: 2rem;
}

.filters-cats {
    ul {
        border-top: 1px solid $gray-light;
        margin-bottom: 0;
    }
    li {
        border-bottom: 1px solid $gray-light;
        text-transform: uppercase;
        &.selected {
            border-bottom: 0;
        }
        .filter-list {
            min-height: 60px;
        }
    }
    .custom-filters {
        .title {
            color: $primary;
        }
    }
    .filters-cat-single {
        align-items: center;
        color: $grayer;
        display: flex;
        justify-content: space-between;
        padding: .5rem .5rem .5rem 1.5rem;
        transition: color .2s ease-in;
        &:hover,
        &.selected {
            background-color: $grey-10;
            color: $grayer;
            transition: background-color .2s ease-in;
            .icon {
                opacity: 1;
                transition: opacity .2s ease-in;
            }
        }
    }
    .icon-arrow-down {
        fill: currentColor;
        float: right;
        height: .9rem;
        opacity: 0;
        transition: opacity .2s ease-in;
        width: .9rem;
    }
}

.single-filter {
    @include font-type(text);
    @include clearfix;
    align-items: center;
    background: $grey-10;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    margin-bottom: .5rem;
    opacity: .5;
    padding-right: .5rem;
    position: relative;
    &.selected,
    &.active {
        color: $grayer;
        opacity: 1;
        transition: opacity .2s linear;
    }
    .name,
    .number {
        padding: 8px 10px;
    }
    .name {
        @include ellipsis(100%);
        border-color: transparent;
        border-style: solid;
        border-width: 0 0 0 3px;
        display: block;
        width: 100%;
        img {
            vertical-align: middle;
        }
    }
    .number {
        background: $grey-20;
        position: absolute;
        right: 0;
        top: 0;
    }
    .remove-filter {
        cursor: pointer;
        display: block;
        svg {
            fill: $gray;
            transition: fill .2s linear;
        }
        &:hover {
            svg {
                fill: $red;
            }
        }
    }
}
